<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>鱼工智能</title>
	<style>
		*{
			margin: 0;
			padding: 0;
			list-style: none;
		}
		body{
			max-width: 100%;
			height: 500px;
			background: url(http://p0.ifengimg.com/pmop/2018/0602/A87E9E99EED39905968675EBAC84E601CA30192C8_size48_w820_h545.jpeg) no-repeat;
			background-size: cover;
		}
		.text{
			position: absolute;
			top: 100px;
			right: 260px;
			text-shadow: 0 0 20px #fefcc9, 10px -10px 30px #feec85, -20px -20px 40px #ffae34, 20px -40px 50px #ec760c, -20px -60px 60px #cd4606,
						 0 -80px 70px #973716, 10px -90px 80px #451b0e; 
			font-family:Verdana, Geneva, sans-serif; 
			font-size:100px; 
			font-weight:bold; 
			color:white;
		}
		ul{
			position: absolute;
			top: 320px;
			right: 300px;
			display: flex;
			width: 300px;
			height: 50px;
			justify-content: space-between;
		}
		ul li{
			display: inline-block;
			height: 50px;
			font-size: 34px;
		}
		.wrap{
			position: absolute;
			top: 400px;
			right: 380px;
		}
		.wrap button{
			display: inline-block;
			width: 80px;
			height: 40px;
		}
	</style>
</head>
<body>
    <div class="text">
    	鱼工智能
    </div>
    <ul>
	   	<li>西班牙</li>
	   	<li id="num1">0</li>
	   	<li>:</li>
	   	<li id="num2">0</li>
	   	<li>葡萄牙</li>
    </ul>
    <div class="wrap">
   		<button id="start">马上预测</button>
   		<button id="stop">立即投注</button>
    </div>
</body>
	<script>

		var oStart=document.getElementById('start'),
			oStop=document.getElementById('stop'),
			oNum1=document.getElementById('num1'),
			oNum2=document.getElementById('num2'),
			str='',
			a=null;

			oStart.onclick=function(){
				if(a==undefined){
					a=setInterval(function(){
						str=Math.trunc(Math.random()*5);
						oNum1.innerHTML=str;
						str=randomNum(0,5);
						oNum2.innerHTML=str;
						},10)
					}

				}
			oStop.onclick=function(){
				clearInterval(a);
				a=null;
			}


		function randomNum(minNum,maxNum){ 
			switch(arguments.length){ 
			case 1: 
			  	return parseInt(Math.random()*minNum+1,10); 
				break; 
			case 2: 
			  	return parseInt(Math.random()*(maxNum-minNum+1)+minNum,10); 
				break; 
			default: 
			  	return 0; 
			  	break; 
			 } 
		} 
	</script>
</html>